import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { createProxyMiddleware } from 'http-proxy-middleware';
// const baseURL = 'https://www.thytc2.com';
const baseURL = 'http://localhost:3010';
async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.use(
    '/okxs',
    createProxyMiddleware({
      target: baseURL,
      changeOrigin: true,
      pathRewrite: {
        '^/okxs': '',
      },
      secure: false,
    }),
  );
  await app.listen(3000);
}
bootstrap();
